$('.but').on('click', function () {
    const boy = $('body, html');
    if(boy.hasClass('active')){
        boy.removeClass('active');
    }else{
        boy.addClass('active');
    }
});